/**
 * 全局样式文件
 */

/* 全局字体设置 */
$font-family-base: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, sans-serif;
$font-weight-normal: 500;
$font-weight-bold: 700;

/* 应用全局字体到所有元素 */
page,
view,
text,
navigator,
button,
textarea,
label,
form,
input,
image,
scroll-view,
swiper,
swiper-item,
cover-view,
cover-image,
rich-text,
picker,
picker-view {
  font-family: $font-family-base;
  font-weight: $font-weight-normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
}

/* 加粗文本优化 */
.font-bold,
text.bold,
view.bold {
  font-weight: $font-weight-bold;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* 文本溢出省略号 */
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 多行文本溢出省略号 */
.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 通用边距 */
.m-10 {
  margin: 10rpx;
}

.m-20 {
  margin: 20rpx;
}

.p-10 {
  padding: 10rpx;
}

.p-20 {
  padding: 20rpx;
}

/* 通用字体大小 */
.font-sm {
  font-size: 28rpx;
}

.font-md {
  font-size: 32rpx;
}

.font-lg {
  font-size: 36rpx;
}

.font-xl {
  font-size: 40rpx;
}

/* 通用字体粗细 */
.font-normal {
  font-weight: $font-weight-normal;
}

.font-bold {
  font-weight: $font-weight-bold;
}

/* 通用颜色 */
.text-primary {
  color: #1e3c72;
}

.text-secondary {
  color: #666;
}

.text-light {
  color: #999;
}

.bg-white {
  background-color: #fff;
}

.bg-light {
  background-color: #f5f5f5;
}

/* 通用布局 */
.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-around {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

/* 边框样式 */
.border {
  border: 1rpx solid #eee;
}

.border-bottom {
  border-bottom: 1rpx solid #eee;
}

.border-top {
  border-top: 1rpx solid #eee;
}

.border-radius {
  border-radius: 8rpx;
}

/* 阴影效果 */
.shadow {
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15);
} 